package com.chinacoal.microservice.api.model.resource;

import java.util.ArrayList;
import java.util.List;

public class BusinessData {

	protected List<CanvasData> business;
	protected TableCanvasData fileInfo;
	protected TableCanvasData approvalRecords;
	protected DictionaryCanvasData buttonInfo;
	protected DictionaryCanvasData resultInfo;
	

	public BusinessData addFormCanvasData(FormCanvasData formCanvasData){
		if(business == null){
			this.business = new ArrayList<CanvasData>();
		}
		this.business.add(formCanvasData);
		return this;
	}
	
	public BusinessData addTableCanvasData(TableCanvasData tableCanvasData){
		if(business == null){
			this.business = new ArrayList<CanvasData>();
		}
		this.business.add(tableCanvasData);
		return this;
	}
	
	public BusinessData addNewPageCanvasData(NewPageCanvasData newPageCanvasData){
		if(business == null){
			this.business = new ArrayList<CanvasData>();
		}
		this.business.add(newPageCanvasData);
		return this;
	}
	
	public BusinessData addTabPageCanvasData(TabPageCanvasData tabPageCanvasData){
		if(business == null){
			this.business = new ArrayList<CanvasData>();
		}
		this.business.add(tabPageCanvasData);
		return this;
	}
	
	public List<CanvasData> initBusiness(){
		if(business == null){
			this.business = new ArrayList<CanvasData>();
		}
		return this.business;
	}
	
	public TableCanvasData initFileInfo(){
		if(fileInfo == null){
			this.fileInfo = new TableCanvasData();
		}
		return this.fileInfo;
	}
	
	public TableCanvasData initApprovalRecords(){
		if(approvalRecords == null){
			this.approvalRecords = new TableCanvasData();
		}
		return this.approvalRecords;
	}
	
	public DictionaryCanvasData initButtonInfo(){
		if(buttonInfo == null){
			this.buttonInfo = new DictionaryCanvasData();
		}
		return this.buttonInfo;
	}
	
	public DictionaryCanvasData initResultInfo(){
		if(resultInfo == null){
			this.resultInfo = new DictionaryCanvasData();
		}
		return this.resultInfo;
	}
	
	
	//////////////
	public List<CanvasData> getBusiness() {
		return business;
	}
	public void setBusiness(List<CanvasData> business) {
		this.business = business;
	}
	public TableCanvasData getFileInfo() {
		return fileInfo;
	}
	public void setFileInfo(TableCanvasData fileInfo) {
		this.fileInfo = fileInfo;
	}
	public TableCanvasData getApprovalRecords() {
		return approvalRecords;
	}
	public void setApprovalRecords(TableCanvasData approvalRecords) {
		this.approvalRecords = approvalRecords;
	}
	public DictionaryCanvasData getButtonInfo() {
		return buttonInfo;
	}
	public void setButtonInfo(DictionaryCanvasData buttonInfo) {
		this.buttonInfo = buttonInfo;
	}
	public DictionaryCanvasData getResultInfo() {
		return resultInfo;
	}
	public void setResultInfo(DictionaryCanvasData resultInfo) {
		this.resultInfo = resultInfo;
	}
	
	
}
